package com.simple.create.prototype;

/**
 * @author simple
 * @version 1.0
 * @date 2018-12-11 13:46
 * @since 1.0
 */
public class Start {
    public static void main(String[] args) throws Exception {
        Prototype p = new Prototype();
        p.setString("Origin");
        SerializableObject object = new SerializableObject();
        p.setObject(object);
        Prototype clone = (Prototype) p.clone();
        Prototype deepClone = (Prototype) p.deepClone();
        System.out.println(p == clone);
        System.out.println(p == deepClone);
        System.out.println(clone == deepClone);
        System.out.println(p.getString() == clone.getString());
        System.out.println(p.getString() == deepClone.getString());
        System.out.println(clone.getString() == deepClone.getString());
        System.out.println(p.getObject() == clone.getObject());
        System.out.println(p.getObject() == deepClone.getObject());
        System.out.println(clone.getObject() == deepClone.getObject());
    }
}
